#ifndef TCPCLIENT_H
#define TCPCLIENT_H

#include <QObject>
#include <QTcpSocket>
#include <QTimer>
class TcpClient : public QObject
{
    Q_OBJECT
public:
    explicit TcpClient(QObject *parent = nullptr);
public:
    void write(QByteArray&);
private slots:
    void onSocketConnected();
    void onSocketDisconnected();
    void onSocketErrorOccurred(QAbstractSocket::SocketError);
    void onSocketReadyRead();
signals:
private:

    QString ip="192.168.2.13";
    int port =1234;
    QTcpSocket *m_tcpSocket;
    QTimer timer;
};

#endif // TCPCLIENT_H
